package xyz.chaobei.date;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author <a href='mailto:maruichao52@gmail.com'>MRC</a>
 * @since 2021/1/22
 */
public class Test {

    public static void main(String[] args) {

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");

        Date date = new Date();
        System.out.println(dateFormat.format(date));

        Date now = new Date(System.currentTimeMillis() - (7000 * 1000L));
        System.out.println(dateFormat.format(now));
        System.out.println(date.after(now));
    }
}
